Nicolás Kwiatkowski's profile

Latency Monitoring Service

Latency Monitoring Service

This project involves the implementation of a monitoring system that runs locally. The system periodically makes requests to a list of endpoints (URLs) that can be configured by the user, to evaluate and record their latency and availability. The metrics collected are made available for consultation through a REST API.

Technologies Used
The application was developed using the following technologies:
- Node.js and Express: Node.js was used as the server runtime environment and Express as the web application framework for creating the API.
- PostgreSQL: PostgreSQL was implemented as the database management system (DBMS).
- Sequelize: Sequelize was used as an ORM (Object-Relational Mapping) for Node.js, allowing interaction with the database through JavaScript objects, thus facilitating data manipulation.
- Swagger: for documenting the REST API.


Brief
The project was carried out as a required task based on the detailed requirements below:

Web Services State Monitor
Objective
Develop a local service that monitors the latency and availability of various specific web service endpoints. This service must store these metrics and allow their query through a REST API, based on a date range.

Description
This project involves the implementation of a monitoring system that will run on your machine. The system must make periodic requests to a list of configured endpoints (URLs) to assess and record their latency and availability. The collected metrics should be made available for consultation via a REST API.

Functional Requirements
Monitoring Configuration
- The user will be able to define and configure a list of endpoints to monitor through a configuration file or environment variables.
- Configuration of the frequency at which monitoring requests will be made for each endpoint.

Collection and Storage of Metrics
- Execution of HTTP/HTTPS requests to the configured endpoints, recording latency and uptime. Uptime can have 3 states: UP, DELAYED, DOWN. UP if it responds timely and correctly, DELAYED if latency exceeds a certain threshold but still responds, and DOWN if there is an error response or timeout.
- Storage of metrics by date in a suitable database.

REST API for Metric Query
- Implementation of a REST API to query the latency metrics and status by date range. It should be easy to answer the following questions within a period of time:
  - What percentage of time was it UP?
  - What percentage of time was it DELAYED?
  - What percentage of time was it DOWN?
  - What are the p90, p99, and p99.9 latency percentiles within that period?
- The API must offer clear and well-documented endpoints for making queries.

Non-Functional Requirements
Dockerization
- The entire system must be Dockerized, including the monitoring application, the REST API, and any necessary database services.
- A docker-compose.yml file must be included to bring up the entire system with the command `docker-compose up -d`.

Programming Language
Free choice.

Database
Free choice, must be suitable for the volume and type of data handled.

Documentation
- Include detailed documentation on how to run and use the Dockerized system, and documentation of the REST API.

Deliverables
- Source code of the project and relevant Docker files.
- docker-compose.yml for easy deployment of the system.
- Technical and user documentation, including the API REST specification.

Evaluation Criteria
- Compliance with functional and non-functional requirements.
- Design, quality, and clarity of the code and system architecture.
- Complexity and detail of the implementation of the REST API.
- Quality and usefulness of the documentation provided.

This project outline defines a robust framework for building a monitoring system for web services, which should provide a comprehensive solution to assess and react to the performance of critical services in a networked environment.

Latency Monitoring Service
Published:

Latency Monitoring Service

Published: